package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Question;
import com.ruoyi.system.domain.vo.Param;
import com.ruoyi.system.mapper.QuestionMapper;
import com.ruoyi.system.service.IQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionServiceImpl implements IQuestionService {

    @Autowired
    private QuestionMapper questionMapper;

    @Override
    public List<Question> lishQuestion(Integer id) {
        return questionMapper.listQuestion(id);
    }

    @Override
    public String listBank(Integer id) {
        return questionMapper.listBank(id);
    }

    @Override
    public List<Question> queryQuestionsByCondition(Param param) {
        return questionMapper.queryQuestionsByCondition(param);
    }

    @Override
    public void addQuestion(Param param) {
        questionMapper.addQuestion(param);
    }

    @Override
    public void updateQuestion(Param param) {
        System.out.println(param);
        questionMapper.updateQuestion(param);
    }

    @Override
    public void deleteQuestion(Integer id) {
        questionMapper.deleteQuestion(id);
    }
}